import com.baidu.www.Test;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: hp
 * Date: 2024-02-29
 * Time: 22:30
 */
/*class A {
    public static void main(String[] args) {
        Test test = new Test();
    }
}*/

public class Student {
    private String name;
    private int age;
    private String gender;
    int age1;
    public static String classRoom = "112期";

    static {
        System.out.println("静态代码块");
        classRoom = "112java";
    }

    {
        //构造代码块用来实例化非静态成员变量
        System.out.println("实例代码块");
    }
    public Student(String name, int age, String gender) {
        this.name = name;
        this.age = age;
        this.gender = gender;
    }

    public Student() {

    }

    public void show() {
        System.out.println("姓名：" + this.name + " 年龄：" + this.age + " 性别：" + this.gender);
    }

    /*public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return this.name;
    }*/
}
